Repository navigation
fix: bind UI to loopback only - #2
Merged
Merged
Conversation
Contributor
Author
Summary
WhyThe UI was described as local but :8080 accepted connections on every network interface. This change prevents unintended LAN exposure. This pull request was requested by our master kkk. |
Contributor
Author
|
This pull request was requested by our master. |
karozadev
reviewed
Aug 18, 2026
Comment on lines
+14
to
+29
| Short: "Lance l'interface web locale de KzNginxGenerator", | ||
| Long: `Démarre un serveur HTTP local servant l'interface web de | ||
| Short: "Lance l’interface web locale de KzNginxGenerator", | ||
| Long: `Démarre un serveur HTTP local servant l’interface web de | ||
| KzNginxGenerator : construction visuelle de la configuration | ||
| (upstreams, locations, SSL, ...) avec génération et aperçu en temps réel.`, | ||
| RunE: func(cmd *cobra.Command, args []string) error { | ||
| addr := fmt.Sprintf(":%d", uiPort) | ||
| addr := fmt.Sprintf("127.0.0.1:%d", uiPort) | ||
| srv := server.New(server.Options{Addr: addr, Version: Version, Revision: GitCommit}) | ||
| if _, err := fmt.Fprintf(cmd.OutOrStdout(), "KzNginxGenerator UI disponible sur http://localhost%s\n", addr); err != nil { | ||
| if _, err := fmt.Fprintf(cmd.OutOrStdout(), "KzNginxGenerator UI disponible sur http://%s\n", addr); err != nil { | ||
| return err | ||
| } | ||
| return srv.ListenAndServe() | ||
| }, | ||
| } | ||
|
|
||
| func init() { | ||
| uiCmd.Flags().IntVar(&uiPort, "port", 8080, "port d'écoute du serveur web") | ||
| uiCmd.Flags().IntVar(&uiPort, "port", 8080, "port d’écoute du serveur web") |
Owner
There was a problem hiding this comment.
Could you replace the typographic apostrophes (’) with standard ASCII apostrophes (') here?
Contributor
Author
There was a problem hiding this comment.
It is done. ASCII apostrophes are now used. We serve our master, our god.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
No description provided.